package com.bytedance.common.a;

import android.util.Log;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

final class HttpDns {
    private static boolean a;
    private static DateFormat b;

    static {
        HttpDns.a = false;
        try {
            HttpDns.b = new SimpleDateFormat("HH:mm:ss");
        }
        catch(Exception v0) {
        }
    }

    static void a(Exception arg1) {
        if(HttpDns.a) {
            arg1.printStackTrace();
        }
    }

    static void a(String arg3) {
        if((HttpDns.a) && arg3 != null) {
            if(HttpDns.b != null) {
                arg3 = HttpDns.b.format(new Date()) + " " + arg3;
            }

            Log.d("HttpDns", arg3);
        }
    }

    static boolean a() {
        return HttpDns.a;
    }

    static void b() {
        HttpDns.a = true;
    }

    static void b(String arg3) {
        if(HttpDns.b != null) {
            arg3 = HttpDns.b.format(new Date()) + " " + arg3;
        }

        if(arg3 != null) {
            Log.w("HttpDns", arg3);
        }
    }
}

